<script setup>
defineProps({
  prefix: {
    type: String,
    default: '#icons-'
  },
  name: String,
  color: String,
  width: {
    type: String,
    default: '16px'
  },
  height: {
    type: String,
    default: '16px'
  }
})

</script>

<template>
  <!-- es6的对象简写形式，全写为::style="{ width: width, height: height }" -->
  <svg :style="{ width, height }">
    <use :xlink:href="prefix + name" :fill="color"></use>
  </svg>
</template>

<style lang='scss' scoped></style>